import Relay from "react-relay";

export default class ReqAdditionalMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { reqAdditional }`;
    }

    getVariables() {
        return {
            argsInput: {
                desp: this.props.desp,
                money: this.props.money,
                orderId: this.props.orderId,
                uid: this.props.uid,
                supplyAccount: this.props.supplyAccount,
                contractUrl: this.props.contractUrl,
                contractUr2: this.props.contractUr2,
                contractUr3: this.props.contractUr3,
                contractUr4: this.props.contractUr4,
                contractUr5: this.props.contractUr5
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on reqAdditionalPayload {
            reqAdditional {
                errorCode
                totalResult
                value
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on reqAdditionalPayload {
                    reqAdditional {
                        errorCode
                        totalResult
                        value
                    }
             }
            `]
        }];
    }

}
